#pragma once

#include "util.h"
#include "DAEMatrix.h"
using namespace std;
class Animation;
class SkeletonNode;
/**
* Abstract class that represents a controller for an animation.
* @author Koen Samyn
*/
class AnimationNode
{
public:
	/**
	* Creates a new animationnode.
	*/
	AnimationNode(tstring name);
	/**
	* Destroys the animation node.
	*/
	virtual ~AnimationNode(void);
	/**
	* Sets the parent animation object.
	* @param parent the parent animation object.
	*/
	void SetAnimation(Animation* parent){
		m_Parent = parent;
	}
	/**
	* Set the skeleton node this StoredAnimationNode is coupled with.
	* @param skeletonNode the skeleton node to bind to this animation node.
	*/
	void SetSkeletonNode(SkeletonNode* boundNode){
		m_pSkeletonNode = boundNode;
	}
	/**
	* Returns the name for this animation node.
	* @return the name.
	*/
	tstring GetName(){
		return m_Name;
	}
	/**
	* Returns the rotation for this node at the specific time.
	* Time must be within the defined interval.
	* @param time the time to evaluate the rotation.
	* @param deltaTrans an extra transformation to apply to the original transformation.
	* @param matrix the matrix that will be set to the current world transform of the animation.
	* for the animation.
	*/
	virtual const bool GetTransformAt(float time,  DAEMatrix& deltaTrans, DAEMatrix& matrix) = 0;
protected:
	/**
	* The name for the animation node.
	*/
	tstring m_Name;
	/**
	* The animation object that contains this StoredAnimationNode.
	*/
	Animation* m_Parent;
	/**
	* The skeleton node that is coupled with this StoredAnimationNode.
	*/
	SkeletonNode* m_pSkeletonNode;
	// -------------------------
	// Disabling default copy constructor and default assignment operator.
	// If you get a linker error from one of these functions, your class is internally trying to use them. This is
	// an error in your class, these declarations are deliberately made without implementation because they should never be used.
	// -------------------------
	AnimationNode(const AnimationNode& t);
	AnimationNode& operator=(const AnimationNode& t);
};

